gh-143531: Use macro to check if PEP 523 is hooked#143532
Merged
DinoV merged 1 commit intopython:mainfrom Jan 7, 2026
Merged
Conversation
Fidget-Spinner
approved these changes
Jan 7, 2026
meta-codesync bot
pushed a commit
to facebookincubator/cinderx
that referenced
this pull request
Jan 8, 2026
Summary: On yesterday imports we hit some issues with one of the opcodes we've duplicated. We duplicated it so that we could support optimized python -> python calls when we have our eval hook in place. I landed python/cpython#143532 yesterday which makes it possible for us to just redefine the `IS_PEP523_HOOKED` macro. This macro conveniently already defined in our copy of `ceval_macros.h` so the upgrade to consume this is just deleting our overloaded opcodes and picking up the base ones. Reviewed By: jbower-fb Differential Revision: D90279669 fbshipit-source-id: ecc4d87981554aa5a5bf9f27519622cf17cfe2ed
reidenong
pushed a commit
to reidenong/cpython
that referenced
this pull request
Jan 12, 2026
Use macro to check if PEP 523 is hooked
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This just moves the checks to see if PEP-523 is replaced to a common macro in the interpreter loop.
This will allow PEP 523 users who re-generate the interpreter loop (as in #142911) to redefine the macro to support their replacement with the optimizer as well if they so choose. And it makes it more explicit what these checks are doing when they're randomly sprinkled around.